package org.vergil.core.designpattern.command;

/**
 * Created by vergil on 17-3-23.
 */
public class MinimizeCommand extends AbstractCommand {

    private WindowHanlder windowHanlder; //维持对请求接收者的引用

    public MinimizeCommand() {
        windowHanlder = new WindowHanlder();
    }

    @Override
    public void execute() {
        windowHanlder.minimize();
    }

    @Override
    public void undo() {
        windowHanlder.maximize();
    }
}
